Skip to content

Conversation

SwayamInSync
Copy link
Member

@SwayamInSync SwayamInSync commented Oct 6, 2025

This pull request introduces several significant improvements and updates across the build system, CI workflows, and the core implementation of quad-precision constants for the quaddtype package. The main highlights are the addition of a new quad-precision constants header, improved handling of build dependencies (especially for NumPy), and updates to CI to support newer Python and OS versions.

Summary of the most important changes:

Quad-Precision Constants Implementation

  • Added a new header constants.hpp defining quad-precision floating-point and integer constants, as well as a function for querying constants by name, leveraging SLEEF library macros and types.
  • Integrated the new constants into the quad-precision dtype implementation, including a new quadprec_get_constant function and registration with NumPy's DType API. [1] [2] [3] [4]
  • Included the new header in the build system and ensured the relevant source file is compiled.

Build and Dependency Management

  • Updated all CI and build workflows to install NumPy from nightly wheels or source (main branch), ensuring compatibility with the latest Python versions and features. This includes using --no-build-isolation and --break-system-packages where appropriate. [1] [2] [3] [4] [5] [6] [7] [8]
  • Added version checks and informative output for the NumPy version used during the build process.

Continuous Integration and Platform Support

  • Updated base images and Python versions in CI workflows to Ubuntu 24.04 and Python 3.11, and dropped support for Python 3.10 in wheel builds and CI. [1] [2] [3] [4] [5] [6]
  • Improved separation of build and test dependencies in the big endian workflow, installing test requirements only after the main package is built.

Type Stubs

  • Cleaned up type ignore comments for reflected operators in the QuadPrecision type stub.

closes #164

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: In order for this to pass CI, need to build numpy from source. Will do that in follow-up PR

You can probably just add the nightly build to the index: https://scientific-python.org/specs/spec-0004/#test-with-nightly-wheels and then assume that for building.

I dunno if you are OK with a strict NumPy 2.4 requirement, but I suppose for quaddtype it may be just as well.

@SwayamInSync
Copy link
Member Author

You can probably just add the nightly build to the index: scientific-python.org/specs/spec-0004#test-with-nightly-wheels and then assume that for building.

Right, I was also thinking to make nightly the default build as right now or maybe even in future this repo will directly be using the upstream features (if some modifications be needed from NumPy side)
I might not be able to see the point in using different versions and then putting conditional checks everywhere in code to enable/disable features

@SwayamInSync
Copy link
Member Author

for ppc machine building from source as nightly wheels aren't available.
Dropped the python 3.10 pre-built support as numpy nightly wasn't compatible with that

@SwayamInSync SwayamInSync marked this pull request as ready for review October 8, 2025 10:11
@SwayamInSync SwayamInSync changed the title WIP: QuadDtype finfo support QuadDtype finfo support & Nightly CI Oct 8, 2025
@SwayamInSync
Copy link
Member Author

This PR is now ready, we can merge if everything sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Disussion: What numpy build to use for what workflow
2 participants